POV-Ray : Newsgroups : povray.general : Cubic spline question : Re: Cubic spline question Server Time
6 Aug 2024 17:00:02 EDT (-0400)
  Re: Cubic spline question  
From: Rune
Date: 17 Feb 2002 03:56:46
Message: <3c6f704e@news.povray.org>
"Mark Wagner" wrote:
> I am getting quite tired of repeatedly having to
> defend my decision on how cubic splines work.
> Rune, for the record, this is the third time I
> have explained this to you.

I didn't know that, because the way the cubic splines have been worked have
been changing many times.

I acknowledge that I there's many things in this issue I don't know, so
that's why I asked. Ok, so the splines in the spline{} are indeed cubic
splines, just a different type than the splines used in prisms, which are
also labeled cubic splines.

> Rune, if you'll look at the image you attached to the post
> "Yet another spline bug", posted on 8/29/01 in the
> povray.pre-beta.binaries group, you'll see what happens
> when you produce a curve by this method. From looking at
> the code for the prism object, it appears that this is the
> method used by that object.

Sorry, but the sharp corners in the image I posted on 8/29/01 in the
povray.pre-beta.binaries group were caused by a buggy implementation rather
than the spline type itself. FYI prisms do not have such sharp corners.

Here are the problems I have with the current situation:

Cubic splines are a broad class of spline types, yet in both prisms and
spline{} it means a very specific spline. This wouldn't matter so much if it
was the same one in all features of POV-Ray, but to have the word
cubic_spline mean different things in different context is very inconsistent
and is bound to cause confusion.

The natural cubic splines are very difficult to control. Once you have
gotten one segment to look just right, it can be ruined by any of the next
control points added. One serious result of this is that it's nearly
impossible to make a smoothly closed (looping) spline. When using the spline
type in prisms there's an easy rule to follow which is that the first three
an last points should be identical. But with natural cubic splines I have
yet to succeed to make a loop. Can anybody explain how to do it? Perhaps it
would be a good idea if it was explained in the documentation how to make a
smoothly closed spline with this spline type. It would be very relevant!

The best solution in my opinion would be to call the natural cubic spline by
another name maybe "natural_cubic_spline" and then also have support for the
cubic spline type used in prisms, which is easier to control. But of course,
as usual the answer is "please code it yourself" so I guess there's no hope
of seeing that implemented.

Rune
--
3D images and anims, include files, tutorials and more:
Rune's World:    http://rsj.mobilixnet.dk (updated Feb 16)
POV-Ray Users:   http://rsj.mobilixnet.dk/povrayusers/
POV-Ray Webring: http://webring.povray.co.uk


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.